/*
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *如果数据库字段发生变化，请在代码生器重新生成此Model
 */
namespace DGZImp.DemoProject.DomainModels;

[Entity(TableCnName = "产品管理", TableName = "Demo_Product", DetailTable = new Type[] { typeof(Demo_ProductColor), typeof(Demo_ProductSize) }, DetailTableCnName = "颜色,尺寸", DBServer = "ServiceDbContext")]
public partial class Demo_Product : ServiceEntity
{
    /// <summary>
    ///
    /// </summary>
    [SugarColumn(IsPrimaryKey = true)]
    [Key]
    [Display(Name = "ProductId")]
    [Column(TypeName = "uniqueidentifier")]
    [Required(AllowEmptyStrings = false)]
    public Guid ProductId { get; set; }

    /// <summary>
    ///商品名称
    /// </summary>
    [Display(Name = "商品名称")]
    [MaxLength(100)]
    [Column(TypeName = "nvarchar(100)")]
    [Editable(true)]
    [Required(AllowEmptyStrings = false)]
    public string ProductName { get; set; }

    /// <summary>
    ///商品编号
    /// </summary>
    [Display(Name = "商品编号")]
    [MaxLength(100)]
    [Column(TypeName = "varchar(100)")]
    [Editable(true)]
    [Required(AllowEmptyStrings = false)]
    public string ProductCode { get; set; }

    /// <summary>
    ///价格
    /// </summary>
    [Display(Name = "价格")]
    [DisplayFormat(DataFormatString = "18,2")]
    [Column(TypeName = "decimal")]
    [Editable(true)]
    [Required(AllowEmptyStrings = false)]
    public decimal Price { get; set; }

    /// <summary>
    ///审核状态
    /// </summary>
    [Display(Name = "审核状态")]
    [Column(TypeName = "int")]
    public int? AuditStatus { get; set; }

    /// <summary>
    ///逻辑删除标志
    /// </summary>
    [Display(Name = "逻辑删除标志")]
    [Column(TypeName = "int")]
    public int? IsValid { get; set; }

    /// <summary>
    ///备注
    /// </summary>
    [Display(Name = "备注")]
    [MaxLength(500)]
    [Column(TypeName = "nvarchar(500)")]
    [Editable(true)]
    public string Remarks { get; set; }

    /// <summary>
    ///
    /// </summary>
    [Display(Name = "CreateId")]
    [Column(TypeName = "bigint")]
    public long? CreateId { get; set; }

    /// <summary>
    ///创建人
    /// </summary>
    [Display(Name = "创建人")]
    [MaxLength(30)]
    [Column(TypeName = "nvarchar(30)")]
    [Editable(true)]
    public string Creator { get; set; }

    /// <summary>
    ///创建时间
    /// </summary>
    [Display(Name = "创建时间")]
    [Column(TypeName = "datetime")]
    [Editable(true)]
    public DateTime? CreateTime { get; set; }

    /// <summary>
    ///
    /// </summary>
    [Display(Name = "ModifyId")]
    [Column(TypeName = "bigint")]
    public long? ModifyId { get; set; }

    /// <summary>
    ///修改人
    /// </summary>
    [Display(Name = "修改人")]
    [MaxLength(30)]
    [Column(TypeName = "nvarchar(30)")]
    [Editable(true)]
    public string Modifier { get; set; }

    /// <summary>
    ///修改时间
    /// </summary>
    [Display(Name = "修改时间")]
    [Column(TypeName = "datetime")]
    [Editable(true)]
    public DateTime? ModifyTime { get; set; }

    [Display(Name = "颜色")]
    [ForeignKey("ProductId")]
    [Navigate(NavigateType.OneToMany, nameof(ProductId), nameof(ProductId))]
    public List<Demo_ProductColor> Demo_ProductColor { get; set; }


    [Display(Name = "尺寸")]
    [ForeignKey("ProductId")]
    [Navigate(NavigateType.OneToMany, nameof(ProductId), nameof(ProductId))]
    public List<Demo_ProductSize> Demo_ProductSize { get; set; }



}